<!DOCTYPE html>
<html  lang="en">
<head>
    <meta charset="utf-8">
<title>Category: Python - noback</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />



    <meta property="og:type" content="website">
<meta property="og:title" content="noback">
<meta property="og:url" content="http://alpaca-h.gitee.io/categories/blog-back-new/Python/index.html">
<meta property="og:site_name" content="noback">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://alpaca-h.gitee.io/images/og_image.png">
<meta property="article:author" content="Alpaca">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://alpaca-h.gitee.io/images/og_image.png">







<link rel="icon" href="/images/favicon.svg">


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.7.2/css/bulma.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,600|Source+Code+Pro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/styles/androidstudio.css">


    
    
    
    <style>body>.footer,body>.navbar,body>.section{opacity:0}</style>
    

    
    
    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/css/lightgallery.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.css">
    

    
    

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.css">


    
    
    
    

<link rel="stylesheet" href="/css/back-to-top.css">


    
    

    
    
    
    

    
    
<link rel="stylesheet" href="/css/progressbar.css">
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>

    
    
    

    
    
    
        <script async="" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    

    


<link rel="stylesheet" href="/css/style.css">
<meta name="generator" content="Hexo 4.2.0"><link rel="alternate" href="/atom.xml" title="noback" type="application/atom+xml">
</head>
<body class="is-3-column">
    <nav class="navbar navbar-main">
    <div class="container">
        <div class="navbar-brand is-flex-center">
            <a class="navbar-item navbar-logo" href="/">
            
                <img src="/images/logo.svg" alt="noback" height="28">
            
            </a>
        </div>
        <div class="navbar-menu">
            
            <div class="navbar-start">
                
                <a class="navbar-item"
                href="/">Home</a>
                
                <a class="navbar-item"
                href="/archives/">Archives</a>
                
                <a class="navbar-item"
                href="/categories/">Categories</a>
                
                <a class="navbar-item"
                href="/tags/">Tags</a>
                
                <a class="navbar-item"
                href="/about/">About</a>
                
            </div>
            
            <div class="navbar-end">
                
                    
                    
                    <a class="navbar-item" target="_blank" title="AlphaLxy GitHub" href="https://www.github.com/AlphaLxy">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                    
                
                
                
                <a class="navbar-item search" title="Search" href="javascript:;">
                    <i class="fas fa-search"></i>
                </a>
                
            </div>
        </div>
    </div>
</nav>
    
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column is-8-tablet is-8-desktop is-6-widescreen has-order-2 column-main"><div class="card">
    <div class="card-content">
        <nav class="breadcrumb" aria-label="breadcrumbs">
        <ul>
            <li><a href="/categories">Categories</a></li>
            
            <li><a href="/categories/blog-back-new/">blog_back_new</a></li>
            
            <li class="is-active"><a href="#" aria-current="page">Python</a></li>
        </ul>
        </nav>
    </div>
</div>

    <div class="card">
    
    <div class="card-content article ">
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/2020/01/02/blog_back_new/Python/python-re%E6%A8%A1%E5%9D%97/"><i class="fas fa-angle-double-right"></i>Python-re模块</a>
            
        </h1>
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2020-01-02T05:56:28.000Z"><i class="far fa-calendar-alt">&nbsp;</i>2020-01-02</time>
                
                <time class="level-item has-text-grey is-hidden-mobile" datetime="2020-01-03T06:26:25.505Z"><i class="far fa-calendar-check">&nbsp;</i>2020-01-03</time>
                
                
                <div class="level-item">
                <i class="far fa-folder-open has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/categories/blog-back-new/Python/">Python</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    <i class="far fa-clock"></i>&nbsp;
                    
                    
                    4 minutes read (About 578 words)
                </span>
                
                
            </div>
        </div>
        
        <div class="content">
            <h2 id="Python-正则表达式-re模块"><a href="#Python-正则表达式-re模块" class="headerlink" title="Python 正则表达式 re模块"></a>Python 正则表达式 re模块</h2><p>正则表达式在很多文本匹配中都要用到，在python中我们用到re模块，由于经常会忘记，记录一下已做备用<br>3.8版本官网地址<a href="https://docs.python.org/zh-cn/3/library/re.html#" target="_blank" rel="noopener">https://docs.python.org/zh-cn/3/library/re.html#</a></p>
<h2 id="使用正则表达式"><a href="#使用正则表达式" class="headerlink" title="使用正则表达式"></a>使用正则表达式</h2><p>匹配流程:<br>编写表达式引擎，编译成对象，获取匹配文本，得出匹配结果</p>
<h3 id="元字符"><a href="#元字符" class="headerlink" title="元字符"></a>元字符</h3><p>1) “.” 可以只带所有字符，除了换行符\n,一个点对应一个字符<br>2) “^” 从整个字符串开头的地方匹配<br>3) “$” 从整个字符出啊弄的结尾开始匹配<br>4）”*” 重复匹配0到无穷次<br>5) “+” 重复匹配1到无穷次<br>6）”?”  匹配一次或0次 [0,1]<br>7) “x{nums}” 匹配x nums次<br>8) “[]” 字符集，”[-]” 字符集+字符区间 匹配区间内任意字符<br>9) “&quot; </p>
<pre><code class="bash">\d # 表示 匹配任何十进制数 相当于[0-9]
\D # 表示 匹配非数字字符，相当于[^0-9]
\s # 表示 匹配任何空白字符 相当于[\t\n\r\f\v]
\S # 表示 匹配任何非空白字符 相当于[^\t\n\r\f\v]
\w # 表示 匹配任何字母数字字符  相当于[a-zA-Z0-9]
\W # 表示 匹配任何非字母数字字符，相当于 [^a-zA-Z0-9]
\b # 表示 匹配一个单词边界，</code></pre>
<p>10) () 将括号中的内容 当作整体来对待<br>11) | 表示或</p>
<h3 id="方法"><a href="#方法" class="headerlink" title="方法"></a>方法</h3><ul>
<li>findall() 全部找到，返回一个列表</li>
<li>search() 匹配处第一个满足条件的结果，返回的是一个对象，可以通过调用group方法</li>
<li>match() 返回匹配到的第一个对象，只在字符串开始匹配<pre><code class="bash">#注意：
# match()  只检测RE是不是在string的开始位置匹配， 
# search() 会扫描整个string查找匹配；
# 也就是说match() 只有在0位置匹配成功的话才有返回，如果不是开始位置匹配成功的话，match()就返回none</code></pre>
</li>
<li>split() 分隔符 返回列表<pre><code class="python">result = re.split(&quot;j&quot;,&quot;xsxsdsjdlsajdlj j j j j&quot;) 
result = re.split(&quot;[j,k]&quot;,&quot;ddsdjsjk xkskd;l lk;ld;s&quot;)
# 数组分隔会先更根据j分隔 再根据k分隔</code></pre>
</li>
<li>sub() 替换 类似于字符串的replace方法<pre><code class="bash">ret = re.sub(&quot;a..x&quot;,&#39;hzj&#39;,&#39;hello,alex&#39;)
print(ret) # ==&gt; hello,hzj </code></pre>
</li>
</ul>
<h2 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h2><p><a href="https://docs.python.org/zh-cn/3/library/re.html#" target="_blank" rel="noopener">https://docs.python.org/zh-cn/3/library/re.html#</a></p>

        </div>
        
        
        
        
    </div>
</div>









    <div class="card">
    
    <div class="card-content article ">
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/2019/12/29/blog_back_new/Python/%E7%88%AC%E8%99%AB/%E7%88%AC%E5%8E%BBYouTube%E4%B8%8A%E7%9A%84%E8%A7%86%E9%A2%91/"><i class="fas fa-angle-double-right"></i>Python爬YouTube视频</a>
            
        </h1>
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-12-29T12:39:12.000Z"><i class="far fa-calendar-alt">&nbsp;</i>2019-12-29</time>
                
                <time class="level-item has-text-grey is-hidden-mobile" datetime="2019-12-29T12:56:13.071Z"><i class="far fa-calendar-check">&nbsp;</i>2019-12-29</time>
                
                
                <div class="level-item">
                <i class="far fa-folder-open has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/categories/blog-back-new/Python/">Python</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    <i class="far fa-clock"></i>&nbsp;
                    
                    
                    7 minutes read (About 1019 words)
                </span>
                
                
            </div>
        </div>
        
        <div class="content">
            <h1 id="youtube视频爬虫"><a href="#youtube视频爬虫" class="headerlink" title="youtube视频爬虫"></a>youtube视频爬虫</h1><h2 id="缘由"><a href="#缘由" class="headerlink" title="缘由"></a>缘由</h2><p>最近想学习nginx，无奈没有好的视频，网上的教程也是零零散散的，慕课网 51CTO 淘宝上又买不到太好的教程，主要还是贵，买来要是讲的烂还不能退QAQ</p>
<p>于是，在YouTobe上搜索了一下nginx的教程，我的天哪！油管简直就是一块宝地，好多付费的视频上面都能找到，长期混迹B站找视频的我，决定赶紧下下来，生怕待会就没了，那么问题来了，如何批量下载这些视频呢？</p>
<p><strong>当然拉，能不白嫖还不是不要白嫖，要是讲的好，赞助一下也很重要</strong></p>
<h2 id="使用you-get"><a href="#使用you-get" class="headerlink" title="使用you-get"></a>使用you-get</h2><p>Github地址: <a href="https://github.com/soimort/you-get" target="_blank" rel="noopener">https://github.com/soimort/you-get</a><br>不得不说，光看他的star，又是一块宝藏QAQ</p>
<h2 id="编写脚本"><a href="#编写脚本" class="headerlink" title="编写脚本"></a>编写脚本</h2><p>既然有了下载器，接下来就是使用脚本批量下载了。<br>you-get是根据油管的视频网页地址去下载视频的，那么我们需要记录这一组视频列表中的url地址。<br><a href="https://www.youtube.com/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD" target="_blank" rel="noopener">https://www.youtube.com/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD</a><br><a href="https://www.youtube.com/watch?v=wZAf-aE2KoI&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD" target="_blank" rel="noopener">https://www.youtube.com/watch?v=wZAf-aE2KoI&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD</a><br><a href="https://www.youtube.com/watch?v=ULcqKLwf6fE&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD" target="_blank" rel="noopener">https://www.youtube.com/watch?v=ULcqKLwf6fE&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD</a><br>如上是三个测试地址，很不幸的是他们之间存在规律，但唯一发生变化的v=uid 其中的id是一串随机字符，但当我们不断刷新当前页面时会发现，uid并没有改变，也就是说在他们的数据库中存在一个key-value的值，每一个视频对一个随机uid,并且当这相对的关系生成之后，随机uid不会再发生改变。</p>
<h2 id="获取uid"><a href="#获取uid" class="headerlink" title="获取uid"></a>获取uid</h2><p>既然不会发生改变，那么我们就用爬虫来获取这些uid把<br><strong>注意</strong></p>
<p><img src="http://img.noback.top/youtobe%E7%88%AC%E8%99%AB.png" alt=""><br>像这样的页面虽然在他的右侧出现了列表，但这样的情况在当我们使用爬虫+正则的时，会被下方的视频连接干扰，因此最好先进入播放列表后再爬取<br><img src="http://img.noback.top/190909youtobe%E7%88%AC%E8%99%AB2.png" alt=""><br>像当前页面这样，我们所获取出来的uid就相对于完整一些<br><img src="http://img.noback.top/190909youtobe%E7%88%AC%E8%99%AB2.png" alt=""></p>
<h2 id="整理循环下载"><a href="#整理循环下载" class="headerlink" title="整理循环下载"></a>整理循环下载</h2><p>OK,有了uid再加上之前我们发现的不变的元素，那么一条条完整的视频链接就有了</p>
<h2 id="源码"><a href="#源码" class="headerlink" title="源码"></a>源码</h2><pre><code class="python">#!/usr/bin/python3
from you_get import common as you_get
import sys
import os
import time
import requests
import re

static_url = &quot;https://www.youtube.com{0}list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&quot;
file_path = &quot;D:\\video\youtobe_nginx_mooc&quot;
# file_path = &quot;F:\\video\youtobe_nginx_mooc&quot;


resp = requests.get(&quot;https://www.youtube.com/playlist?list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&quot;)
pattern = &quot;\/watch\?v=[0-9a-zA-Z_-]{11}&amp;&quot;
video_url_lists = re.findall(pattern,resp.text)
# 去重
video_url_lists = list(set(video_url_lists))
print(len(video_url_lists))
for list in video_url_lists:
    format_url = static_url.format(list)
    print(format_url)
    print(&quot;start get video from YouTobe&quot;)
    sys.argv = [&#39;you-get&#39;,&#39;-o&#39;,file_path,format_url]
    you_get.main()
    time.sleep(1)
print(&quot;download finished&quot;)

# print(type(resp)) ## 由于这是返回的类型是 &lt;class &#39;requests.models.Response&#39;&gt;
# 但是在正则表达式中，要求是为str类型，因此如果我们使用pattern = re.findall(&#39;index&#39; resp)时候就会报错
# 报错内容为TypeError: expected string or bytes-like object
# 修改 pattern = re.findall(&#39;index=&#39;,str(resp))
# 或者使用pattern = re.findall(&#39;index=&#39;,resp.text)

&quot;&quot;&quot;&quot;
https://www.bilibili.com/read/cv4360/
https://www.jianshu.com/p/e323cf85bd3d

&quot;&quot;&quot;

&quot;&quot;&quot;
https://www.youtube.com/watch?v=5i9Ce9vzGxE&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=1
https://www.youtube.com/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=1
https://www.youtube.com/watch?v=R4p7xxd3BTo&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=4
https://www.youtube.com/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=1
https://www.youtube.com/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=1
/watch?v=Do1Opl6DbvM&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=1
https://www.youtube.com/watch?v=0JwSFgWUUQE&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD

https://www.youtube.com/watch?v=fvxAQsRy8Kk&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=8
https://www.youtube.com/watch?v=R4p7xxd3BTo&amp;list=PLAyxoOmo7O7eoz-Wkii_bwtBEbPwCWQzD&amp;index=4
&quot;&quot;&quot;</code></pre>

        </div>
        
        
        
        
    </div>
</div>









    <div class="card">
    
    <div class="card-content article ">
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/2019/12/27/blog_back_new/Python/python%E5%B8%B8%E7%94%A8%E6%96%B9%E6%B3%951/"><i class="fas fa-angle-double-right"></i>Python常用方法</a>
            
        </h1>
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-12-27T09:36:31.000Z"><i class="far fa-calendar-alt">&nbsp;</i>2019-12-27</time>
                
                <time class="level-item has-text-grey is-hidden-mobile" datetime="2020-01-04T00:18:01.299Z"><i class="far fa-calendar-check">&nbsp;</i>2020-01-04</time>
                
                
                <div class="level-item">
                <i class="far fa-folder-open has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/categories/blog-back-new/Python/">Python</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    <i class="far fa-clock"></i>&nbsp;
                    
                    
                    5 minutes read (About 685 words)
                </span>
                
                
            </div>
        </div>
        
        <div class="content">
            <h1 id="python-常用方法"><a href="#python-常用方法" class="headerlink" title="python 常用方法"></a>python 常用方法</h1><h2 id="保留小数"><a href="#保留小数" class="headerlink" title="保留小数"></a>保留小数</h2><p>使用字符串格式化</p>
<pre><code class="python">a = 11.234
print(&quot;%.2f&quot;%a) </code></pre>
<p>使用round内置函数</p>
<pre><code class="python">a = 11.234
a = round(a,2)
print(a) </code></pre>
<p>使用decimal模块</p>
<pre><code class="python">from decimal import Decimal
a = 12.345
Decimal(a).quantize(Decimal(&quot;0.00&quot;)) </code></pre>
<h2 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h2><h3 id="列表合并"><a href="#列表合并" class="headerlink" title="列表合并"></a>列表合并</h3><pre><code class="python"># 使用+号操作
list1 = [1,2,3,4,5]
list2 = [&quot;z&quot;,&quot;xx&quot;,] 
list3 = list1+list2
# 使用extend
list4.extend(list1)
# 使用切片
list4[len(11):len(11)] = list5</code></pre>
<h2 id="os模块"><a href="#os模块" class="headerlink" title="os模块"></a>os模块</h2><h3 id="Python获取指定文件夹下的文件名"><a href="#Python获取指定文件夹下的文件名" class="headerlink" title="Python获取指定文件夹下的文件名"></a>Python获取指定文件夹下的文件名</h3><p><font color='red'>模块os.walk可以遍历文件夹下的所有文件</font></p>
<pre><code class="python">os.walk(top, topdown=Ture, οnerrοr=None, followlinks=False)
# return  (dirpath dirnames filenames)</code></pre>
<ul>
<li>dirpath: string 代表目录的路径</li>
<li>dirnames list 包含了当前dirpath路径下所有的子目录名字（不包含目录路径）</li>
<li>filenames：list，包含了当前dirpath路径下所有的非目录子文件的名字（不包含目录路径）。<pre><code class="python">import os
</code></pre>
</li>
</ul>
<p>def file_name(file_dir):<br>    for root, dirs, files in os.walk(file_dir):<br>        print(root) #当前目录路径<br>        print(dirs) #当前路径下所有子目录<br>        print(files) #当前路径下所有非目录子文件<br>        for file in files:<br>            # os.path.splitext # 对文件名进行切割成数组<br>            if os.path.splitext(file)[1] == “.jpeg”:<br>              print(file)<br>            else:<br>              pass</p>
<pre><code>
&lt;font color=&#39;red&#39;&gt;模块os.listdir()可以得到当前路径下的文件名，不包括子目录中的文件&lt;/font&gt;

```python
import os
# 遍历获取所有文件
def listdir(path, list_name):
    for file in os.listdir(path):
        file_path = os.path.join(path, file)
        # os.path.isdir(file) #判断文件是否为文件夹
        if os.path.isdir(file_path):
            listdir(file_path, list_name)
        elif os.path.splitext(file_path)[1]==&#39;.jpeg&#39;:
            list_name.append(file_path)</code></pre><h3 id="判断文件类型"><a href="#判断文件类型" class="headerlink" title="判断文件类型"></a>判断文件类型</h3><pre><code class="python">os.path.isdir(path) # 是否为文件夹
os.path.isfile(path) # 是否为文件</code></pre>
<h2 id="文件操作"><a href="#文件操作" class="headerlink" title="文件操作"></a>文件操作</h2><p>mode选项<br>r 读模式，只能读 文件不存在报错，<br>w 写模式，只能写 文件不存在则创建，<br>以上存在存在则清空在打开</p>
<p>rb 二进制读模式 只能读  文件不存在报错<br>wb 二进制写模式 只能写  文件不存在则创建，<br>以上存在则清空再打开<br>有二进制内容 写入则需要encode(“utf-8”)</p>
<p>rb+ 二进制读模式 可读可写 文件不存在报错<br>wb+ 二进制写模式 可读可写 文件不存在则创建，<br>以上存在则清空再打开</p>
<p>a 追加写模式，文件存在则追加写入<br>a+ 追加读写方式<br>以上存在则追加写入</p>
<p>默认进入为文件末尾<br>f.seek(0) 设置读写位置为开头<br>f.truncate(0) 将文章字节阶段为0</p>
<h3 id="文件头部写如文件"><a href="#文件头部写如文件" class="headerlink" title="文件头部写如文件"></a>文件头部写如文件</h3><pre><code class="bash">with open(path, &quot;r+&quot;) as f:
     old = f.read()
     f.seek(0)
     f.write(data)
     f.write(old)</code></pre>
<p>或者</p>
<pre><code class="bash">with open(path,&quot;a&quot;) as f:
      f.seek(0)
      old = f.read()
      # 全部删除
      f.truncate(0)
      f.write(&quot;---&quot;)
      f.write(&quot;tags: xxx&quot;)
      f.write(&quot;---&quot;)
      f.close()</code></pre>
<h2 id="python应"><a href="#python应" class="headerlink" title="python应"></a>python应</h2>
        </div>
        
        
        
        
    </div>
</div>









    <div class="card">
    
    <div class="card-content article ">
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/2019/12/27/blog_back_new/Python/python%E6%8A%A5%E9%94%99%E6%80%BB%E7%BB%93/"><i class="fas fa-angle-double-right"></i>Python报错总结</a>
            
        </h1>
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-12-27T09:36:10.000Z"><i class="far fa-calendar-alt">&nbsp;</i>2019-12-27</time>
                
                <time class="level-item has-text-grey is-hidden-mobile" datetime="2019-12-27T14:28:59.239Z"><i class="far fa-calendar-check">&nbsp;</i>2019-12-27</time>
                
                
                <div class="level-item">
                <i class="far fa-folder-open has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/categories/blog-back-new/Python/">Python</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    <i class="far fa-clock"></i>&nbsp;
                    
                    
                    a few seconds read (About 60 words)
                </span>
                
                
            </div>
        </div>
        
        <div class="content">
            <h1 id="Python报错总结"><a href="#Python报错总结" class="headerlink" title="Python报错总结"></a>Python报错总结</h1><h2 id="Non-ASCII"><a href="#Non-ASCII" class="headerlink" title="Non-ASCII"></a>Non-ASCII</h2><p>python出现SyntaxError: Non-ASCII character ‘\xe6’ in file 打印日期.py on line 1, but no encoding declared;</p>
<p><font color='red'>解决方法</font><br>在文件头部添加如下两行注释码：</p>
<pre><code class="python">#!/usr/bin/python
# -*- coding: &lt;encoding name&gt; -*- 例如，可添加# -*- coding: utf-8 -*-</code></pre>

        </div>
        
        
        
        
    </div>
</div>









</div>
                




<div class="column is-4-tablet is-4-desktop is-3-widescreen  has-order-1 column-left ">
    
        
<div class="card widget">
    <div class="card-content">
        <nav class="level" style="margin-bottom:1rem">
            <div class="level-item has-text-centered">
                <div>
                    
                        <img class="image is-96x96 has-mb-6" src="https://www.gravatar.com/avatar/e0f4032c0f2d1068ffffbaf93c0bef52?s=96" alt="Xinyu Liu">
                    
                    
                    <p class="is-size-4 is-block">
                        Xinyu Liu
                    </p>
                    
                    
                    <p class="is-size-6 is-block">
                        Alpha Lxy
                    </p>
                    
                    
                    <p class="is-size-6 is-flex is-flex-center has-text-grey">
                        <i class="fas fa-map-marker-alt has-mr-7"></i>
                        <span>Beijing, China</span>
                    </p>
                    
                </div>
            </div>
        </nav>
        <nav class="level menu-list is-mobile" style="margin-bottom:1rem">
            <div class="level-item has-text-centered is-marginless">
                <a href="/archives/">
                    <p class="heading">
                        Posts
                    </p>
                    <p class="title has-text-weight-normal">
                        40
                    </p>
                </a>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <a href="/categories/">
                    <p class="heading">
                        Categories
                    </p>
                    <p class="title has-text-weight-normal">
                        13
                    </p>
                </a>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <a href="/tags/">
                    <p class="heading">
                        Tags
                    </p>
                    <p class="title has-text-weight-normal">
                        0
                    </p>
                </a>
            </div>
        </nav>
        <div class="level">
            <a class="level-item button is-link is-rounded" href="https://www.github.com/AlphaLxy" target="_blank">
                <i class="fab fa-github"></i>&nbsp;&nbsp;Follow</a>
        </div>
        
        
    </div>
</div>

    
        

    
        


    
        

    
        <div class="card widget is-hidden-mobile">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            Archives
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/archives/2020/01/">
                <span class="level-start">
                    <span class="level-item">January 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">8</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/archives/2019/12/">
                <span class="level-start">
                    <span class="level-item">December 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">32</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>

    
    
        <div class="column-right-shadow is-hidden-widescreen ">
        
            
<div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            Recent
        </h3>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/keepalive+lvs%E5%9B%9B%E5%B1%82%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="keepalive+lvs 四层负载均衡">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T05:06:09.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/keepalive+lvs%E5%9B%9B%E5%B1%82%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/" class="has-link-black-ter is-size-6">keepalive+lvs 四层负载均衡</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/iptables%E3%80%81firewall%E9%98%B2%E7%81%AB%E5%A2%99/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="iptables、firewall 防火墙">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T04:03:16.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/iptables%E3%80%81firewall%E9%98%B2%E7%81%AB%E5%A2%99/" class="has-link-black-ter is-size-6">iptables、firewall 防火墙</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/netstat/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="netstat">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T03:51:48.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/netstat/" class="has-link-black-ter is-size-6">netstat</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/04/blog_back_new/%E7%BD%91%E7%BB%9C/%E7%BD%91%E7%BB%9C%E9%83%A8%E7%BD%B2%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="网络部署需求分析">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-04T02:22:09.000Z">2020-01-04</time></div>
                    <a href="/2020/01/04/blog_back_new/%E7%BD%91%E7%BB%9C/%E7%BD%91%E7%BB%9C%E9%83%A8%E7%BD%B2%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90/" class="has-link-black-ter is-size-6">网络部署需求分析</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/%E7%BD%91%E7%BB%9C/">网络</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/03/blog_back_new/linux/httpd%E6%9C%8D%E5%8A%A1/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="httpd服务">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-03T09:18:50.000Z">2020-01-03</time></div>
                    <a href="/2020/01/03/blog_back_new/linux/httpd%E6%9C%8D%E5%8A%A1/" class="has-link-black-ter is-size-6">httpd服务</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>

        
            
<div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                Categories
            </h3>
            <ul class="menu-list">
            <li>
        <a class="level is-marginless" href="/categories/blog-back-new/">
            <span class="level-start">
                <span class="level-item">blog_back_new</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">39</span>
            </span>
        </a><ul><li>
        <a class="level is-marginless" href="/categories/blog-back-new/C%E8%AF%AD%E8%A8%80/">
            <span class="level-start">
                <span class="level-item">C语言</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/Python/">
            <span class="level-start">
                <span class="level-item">Python</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">4</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/Rust/">
            <span class="level-start">
                <span class="level-item">Rust</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">5</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/ansible/">
            <span class="level-start">
                <span class="level-item">ansible</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">2</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/django/">
            <span class="level-start">
                <span class="level-item">django</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">8</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/git/">
            <span class="level-start">
                <span class="level-item">git</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/linux/">
            <span class="level-start">
                <span class="level-item">linux</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">4</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/mysql/">
            <span class="level-start">
                <span class="level-item">mysql</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E6%89%A9%E5%B1%95/">
            <span class="level-start">
                <span class="level-item">扩展</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">
            <span class="level-start">
                <span class="level-item">数据结构</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E7%BD%91%E7%BB%9C/">
            <span class="level-start">
                <span class="level-item">网络</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E8%AE%BE%E5%A4%87/">
            <span class="level-start">
                <span class="level-item">设备</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">6</span>
            </span>
        </a></li></ul></li>
            </ul>
        </div>
    </div>
</div>
        
        </div>
    
</div>

                




<div class="column is-4-tablet is-4-desktop is-3-widescreen is-hidden-touch is-hidden-desktop-only has-order-3 column-right ">
    
        
<div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            Recent
        </h3>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/keepalive+lvs%E5%9B%9B%E5%B1%82%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="keepalive+lvs 四层负载均衡">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T05:06:09.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/keepalive+lvs%E5%9B%9B%E5%B1%82%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/" class="has-link-black-ter is-size-6">keepalive+lvs 四层负载均衡</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/iptables%E3%80%81firewall%E9%98%B2%E7%81%AB%E5%A2%99/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="iptables、firewall 防火墙">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T04:03:16.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/iptables%E3%80%81firewall%E9%98%B2%E7%81%AB%E5%A2%99/" class="has-link-black-ter is-size-6">iptables、firewall 防火墙</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/netstat/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="netstat">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-05T03:51:48.000Z">2020-01-05</time></div>
                    <a href="/2020/01/05/blog_back_new/linux/linux%E7%BD%91%E7%BB%9C%E7%AE%A1%E7%90%86/netstat/" class="has-link-black-ter is-size-6">netstat</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/04/blog_back_new/%E7%BD%91%E7%BB%9C/%E7%BD%91%E7%BB%9C%E9%83%A8%E7%BD%B2%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="网络部署需求分析">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-04T02:22:09.000Z">2020-01-04</time></div>
                    <a href="/2020/01/04/blog_back_new/%E7%BD%91%E7%BB%9C/%E7%BD%91%E7%BB%9C%E9%83%A8%E7%BD%B2%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90/" class="has-link-black-ter is-size-6">网络部署需求分析</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/%E7%BD%91%E7%BB%9C/">网络</a>
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <a href="/2020/01/03/blog_back_new/linux/httpd%E6%9C%8D%E5%8A%A1/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/images/thumbnail.svg" alt="httpd服务">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-01-03T09:18:50.000Z">2020-01-03</time></div>
                    <a href="/2020/01/03/blog_back_new/linux/httpd%E6%9C%8D%E5%8A%A1/" class="has-link-black-ter is-size-6">httpd服务</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/categories/blog-back-new/">blog_back_new</a> / <a class="has-link-grey -link" href="/categories/blog-back-new/linux/">linux</a>
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>

    
        
<div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                Categories
            </h3>
            <ul class="menu-list">
            <li>
        <a class="level is-marginless" href="/categories/blog-back-new/">
            <span class="level-start">
                <span class="level-item">blog_back_new</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">39</span>
            </span>
        </a><ul><li>
        <a class="level is-marginless" href="/categories/blog-back-new/C%E8%AF%AD%E8%A8%80/">
            <span class="level-start">
                <span class="level-item">C语言</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/Python/">
            <span class="level-start">
                <span class="level-item">Python</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">4</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/Rust/">
            <span class="level-start">
                <span class="level-item">Rust</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">5</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/ansible/">
            <span class="level-start">
                <span class="level-item">ansible</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">2</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/django/">
            <span class="level-start">
                <span class="level-item">django</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">8</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/git/">
            <span class="level-start">
                <span class="level-item">git</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/linux/">
            <span class="level-start">
                <span class="level-item">linux</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">4</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/mysql/">
            <span class="level-start">
                <span class="level-item">mysql</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E6%89%A9%E5%B1%95/">
            <span class="level-start">
                <span class="level-item">扩展</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">
            <span class="level-start">
                <span class="level-item">数据结构</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E7%BD%91%E7%BB%9C/">
            <span class="level-start">
                <span class="level-item">网络</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">3</span>
            </span>
        </a></li><li>
        <a class="level is-marginless" href="/categories/blog-back-new/%E8%AE%BE%E5%A4%87/">
            <span class="level-start">
                <span class="level-item">设备</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">6</span>
            </span>
        </a></li></ul></li>
            </ul>
        </div>
    </div>
</div>
    
    
</div>

            </div>
        </div>
    </section>
    <footer class="footer">
    <div class="container">
        <div class="level">
            <div class="level-start has-text-centered-mobile">
                <a class="footer-logo is-block has-mb-6" href="/">
                
                    <img src="/images/logo.svg" alt="noback" height="28">
                
                </a>
                <p class="is-size-7">
                &copy; 2020 Alpaca&nbsp;
                Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> & <a
                        href="http://github.com/ppoffice/hexo-theme-icarus" target="_blank">Icarus</a>
                
                <br>
                <span id="busuanzi_container_site_uv">
                Visited by <span id="busuanzi_value_site_uv">0</span> users
                </span>
                
                </p>
            </div>
            <div class="level-end">
            
                <div class="field has-addons is-flex-center-mobile has-mt-5-mobile is-flex-wrap is-flex-middle">
                
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
                        
                        <i class="fab fa-creative-commons"></i>&nbsp;<i class="fab fa-creative-commons-by"></i>&nbsp;<i class="fab fa-creative-commons-nc"></i>&nbsp;<i class="fab fa-creative-commons-sa"></i>&nbsp;
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="AlphaLxy GitHub" href="https://www.github.com/AlphaLxy">
                        
                        <i class="fab fa-github"></i>&nbsp;
                        
                    </a>
                </p>
                
                </div>
            
            </div>
        </div>
    </div>
</footer>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.22.2/min/moment-with-locales.min.js"></script>
<script>moment.locale("en");</script>


    
    
    
    <script src="/js/animation.js"></script>
    

    
    
    
    <script src="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/js/lightgallery.min.js" defer></script>
    <script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js" defer></script>
    <script src="/js/gallery.js" defer></script>
    

    
    

<div id="outdated">
    <h6>Your browser is out-of-date!</h6>
    <p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/" target="_blank" rel="noopener">Update
            my browser now </a></p>
    <p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js" defer></script>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'flex'
        });
    });
</script>


    
    
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML" defer></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
    MathJax.Hub.Config({
        'HTML-CSS': {
            matchFontHeight: false
        },
        SVG: {
            matchFontHeight: false
        },
        CommonHTML: {
            matchFontHeight: false
        },
        tex2jax: {
            inlineMath: [
                ['$','$'],
                ['\\(','\\)']
            ]
        }
    });
});
</script>

    
    

<a id="back-to-top" title="Back to Top" href="javascript:;">
    <i class="fas fa-chevron-up"></i>
</a>
<script src="/js/back-to-top.js" defer></script>


    
    

    
    
    
    

    
    
    
    
    
    <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js" defer></script>
    <script src="/js/clipboard.js" defer></script>
    

    
    
    

    


<script src="/js/main.js" defer></script>

    
    <div class="searchbox ins-search">
    <div class="searchbox-container ins-search-container">
        <div class="searchbox-input-wrapper">
            <input type="text" class="searchbox-input ins-search-input" placeholder="Type something..." />
            <span class="searchbox-close ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="searchbox-result-wrapper ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: 'Posts',
                PAGES: 'Pages',
                CATEGORIES: 'Categories',
                TAGS: 'Tags',
                UNTITLED: '(Untitled)',
            },
            CONTENT_URL: '/content.json',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script src="/js/insight.js" defer></script>
<link rel="stylesheet" href="/css/search.css">
<link rel="stylesheet" href="/css/insight.css">
    
</body>
</html>